<include file="Public:header" />
<link href="__PUBLIC__/style/css/dialog.css" rel="stylesheet">
<link href="__PUBLIC__/css/iconfont.css"  rel="stylesheet">
<script src="__PUBLIC__/js/PCASClass.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/docode.js" type="text/javascript"></script>
<style>
    .itembq{
        height: 32px;line-height: 32px;
    }
    #right-sidebar-log{
        width: 40% !important;
        box-shadow: -2px -1px 10px #ccc;
        background-color: #fff;
        overflow: hidden;
        position: fixed;
        top: 60px;
        right: -40%;
        z-index: 99;
        bottom: 0;
    }
    #business_table td{border: 0;}
    .iconfont{
        font-size: 20px;
        cursor: pointer;
    }
</style>
<div class="wrapper wrapper-content animated fadeIn">
    <div class="row">
        <div class="col-lg-12">
            <!-- <div class="white-bg" style="padding:7px 25px 0px 25px;margin-bottom:15px;">
                    <div class="row " id="title-show">
                            <ul class="nav pull-left" style="margin:2px 0 0 15px;">
                                    <span><img src="__PUBLIC__/img/product_view_icon.png" style="margin-bottom:9px;" alt=""></span>
                                    <span style="font-size:21px;margin-left:5px">{$product['name']}</span>
                            </ul>
                    </div>
            </div> -->

            <div class="tabs-container" style="width: 100%;float: left;">
                <div class="title-bar" style="">
                    <div class="row " id="title-show" style="border-bottom: 1px solid #e7eaec;padding-bottom: 10px;">
                        <ul class="nav pull-left" style="margin:0px 10px 0px 20px;">
                            <span><img src="__PUBLIC__/img/view_icon.png" style="margin-bottom:9px;" alt=""></span>
                            <span style="font-size:24px;color: #000;">{$resume.name}</span>&nbsp;&nbsp;
                            <span class="basic_item">{$resume.sex}</span>
                            <span class="basic_item">{$resume.age}岁</span>
                            <span class="basic_item">{$resume.edu}</span>
                            <span class="basic_item">{$resume.exp}</span>
                        </ul>
                        <if condition="$resume['isperfect']">
                            <embed src="/Public/img/svg/excel.svg" width="24px" height="24px" type="image/svg+xml" pluginspage="http://www.adobe.com/svg/viewer/install/" style="margin-top: 6px;">
                        </if>
                        <div class="btn-group pull-right">
                            <button data-toggle="dropdown" class="btn btn-default dropdown-toggle" aria-expanded="false" style="margin-right: 15px;">操作 <span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu">
                                <li><a id="1" href="{:U('product/edit','id='.$_GET['id'])}"><i class="fa fa-edit (alias)"></i>&nbsp;编辑</a></li>
                                <!--<li><a id="" href="#"><i class="fa fa-bell-o"></i>&nbsp;添加提醒</a></li>-->
                                <!--<li><a id="" href="#"><i class="fa fa-comments"></i>&nbsp;添加备注</a></li>-->
                            </ul>
                        </div>
                        <if condition="$resume['favorite']">
                            <a href="javascript:viod(0);" class="btn btn-outline btn-default pull-right" id="unfavorite" rel="{$_GET['id']}" style="margin-right: 15px;">取消收藏</a>
                            <else/>
                            <a href="javascript:viod(0);" class="btn btn-outline btn-default pull-right" id="favorite" rel="{$_GET['id']}" style="margin-right: 15px;">加入收藏夹</a>
                        </if>
                        <a href="javascript:viod(0);" class="btn btn-outline btn-default pull-right log_calllist" id="add_pro" rel="{$_GET['id']}" style="margin-right: 15px;">加入CallList</a>&nbsp;&nbsp;
                    </div>
                    <div class="row">
                        <div class="form-horizontal view-group " >
                            <div class="form-group">
                                <label class="col-lg-2 control-label">联系电话</label>
                                <div class="col-lg-4">
                                    <p class="form-p telshow" >
                                        <!-- {$resume.telephone} -->
                                        ************
                                        <i class="iconfont iconshow eye"></i>
                                    </p>
                                </div>
                                <label class="col-lg-2 control-label">简历编号</label>
                                <div class="col-lg-4">
                                    <p class="form-p">
                                        {$resume.eid}
                                    </p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">邮箱</label>
                                <div class="col-lg-4">
                                    <p class="form-p mailshow">
                                        ************
                                        <i class="iconfont iconshow eye" ></i>
                                    </p>
                                </div>
                                <label class="col-lg-2 control-label">创建人</label>
                                <div class="col-lg-4">
                                    <p class="form-p">
                                        <a class="role_info" rel="{$resume['creator_role_id']}" href="javascript:void(0)" style="margin-right: 5px;">{$resume['creator_role_name']}</a>
                                    </p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">目前职位</label>
                                <div class="col-lg-4">
                                    <p class="form-p">
                                        {$resume.curPosition}
                                    </p>
                                </div>
                                <label class="col-lg-2 control-label">创建时间</label>
                                <div class="col-lg-4">
                                    <p class="form-p">
                                        {$resume.addtime|date='Y-m-d H:i',###}
                                    </p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">目前城市</label>
                                <div class="col-lg-4">
                                    <p class="form-p">
                                        {$resume.location}
                                    </p>
                                </div>
                                <label class="col-lg-2 control-label">最后更新时间</label>
                                <div class="col-lg-4">
                                    <p class="form-p">
                                        {$resume.lastupdate|date='Y-m-d H:i',###}
                                    </p>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-lg-2 control-label">设置标签</label>
                                <div class="col-lg-10">
                                    <div class="yibiqiao" style="float: left;margin: 0;">
                                        <volist name="resume['label']" id="vo">
                                            <if condition="$vo neq null">
                                                <span class="itembq"><span class="resume_label">{$vo}</span><i class="mrl10 icon-remove"></i></span>
                                            </if>
                                        </volist>
                                    </div>
                                    <input type="text" class="form-control bqinput bqcontent" maxlength="20px">
                                    <a href="javascript:void(0)" class="addgw" id="addbq" style="vertical-align: -webkit-baseline-middle;margin-left: 10px;">+添加标签</a>
                                </div>
                            </div>
                            <p style='padding-left:25px;margin:0'>备注</p>
                            <div id="tab5" class="tab-pane fade in" >
                                <div class="panel-body" style='padding-top:12px;'>
                                    <if condition="$content neq 'resource'">
                                        <div id="form-div">
                                            <form id="add-form" action="{:U('Log/add')}" method="post">
                                                <input type='hidden' name="r" value="rResumeLog"/>
                                                <input type='hidden' name="module" value="resume"/>
                                                <input type='hidden' id="resume_id" name="id" value="{$resume['eid']}"/>
                                                <input type='hidden' name="role_id" value="{$Think.session.role_id}"/>
                                                <textarea name="content" placeholder="添加跟进记录" id="log-text" style="resize:none;" class="form-control" cols="30" rows="2"></textarea>
                                                <table class="table business_table" style="border:none;margin-top:15px;display:none;" id="business_table">
                                                    <tr >
                                                        <td class="tdleft" style="width:120px;">跟进类型：</td>
                                                        <td style="width:120px;">
                                                            <select name="status_id" id="status_id" class="form-control" onchange="selectStatus()">
                                                                <option value="">--请选择--</option>
                                                                <option value="1">电话</option><option value="2">发邮件</option><option value="3">发短信</option><option value="4">见面拜访</option><option value="5">基本情况</option><option value="6">备注</option>
                                                                <!--<volist name="status_list" id="vo">-->
                                                                <!--<option value="{$vo['id']}">{$vo['name']}</option>-->
                                                                <!--</volist>-->
                                                            </select>
                                                        </td>
                                                        <td style="border-top:0;">&nbsp;&nbsp;</td>
                                                        <td class="tdleft" style="width:120px;">快捷添加：</td>
                                                        <td style="width:300px;">
                                                            <select id="replay_list" class="form-control select2" onchange="selectReply()" style="width:80%;float:left;">
                                                                <option value="">--请选择--</option>
                                                                <volist name="reply_list" id="vo">
                                                                    <option value="{$vo['content']}" rel="{$vo['status_id']}">{$vo['str_content']}</option>
                                                                </volist>
                                                            </select>&nbsp;&nbsp;
                                                            <a href="javascript:void(0)" id="setting_reply_dialog" title="管理快捷跟进模板" style="line-height: 30px;margin-left:10px;"><i class="fa fa-cog" style="color:#999;"></i></a>
                                                        </td>
                                                        <td  style="border-top:0;">&nbsp;&nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td class="tdleft" style="width:120px;">下次联系时间：</td>
                                                        <td style="width:120px;">
                                                            <input type="text" value="" id="nextstep_time_log" class="form-control Wdate" name="nextstep_time" onfocus="WdatePicker({dateFmt: 'yyyy-MM-dd HH:mm'})" style="width: 170px;">
                                                        </td>
                                                        <td>&nbsp;&nbsp;</td>
                                                        <td class="tdleft" style="width:120px;">保存为跟进模板：</td>
                                                        <td style="width:120px;">
                                                            <div class="checkbox checkbox-primary">
                                                                <input type="hidden" name="type" value="2" />
                                                                <input name="save_reply" class="select_list" id="save_reply" type="checkbox" value="1"/>
                                                                <label for=""></label>
                                                            </div>
                                                        </td>
                                                        <td>&nbsp;&nbsp;</td>
                                                    </tr>
                                                </table>
                                                <div>
                                                    <div class="text-right" id="log-btn" style="padding-top:8px;display:none;"><button class="btn btn-primary" id="add_log" type="button">添加</button>&nbsp;</div><br>
                                                </div>
                                            </form>
                                        </div>
                                    </if>
                                    <div id="log-list" style="margin-top: 10px;">
                                        <volist name="log_list" id="vo">
                                            <div class="ibox-content gray-log" log-rel="{$vo['log_id']}" >
                                                <div class="social-feed-separated clearfix">
                                                    <div class="social-feed-box">
                                                        <if condition="$content neq 'resource' && $vo['sign'] eq '0' && $vo['role_id'] eq session('role_id')">
                                                            <div class="pull-right social-action dropdown">
                                                                <span data-toggle="dropdown" class="dropdown-toggle">
                                                                    <i style="font-size:20px;cursor:pointer" class="fa fa-angle-down"></i>
                                                                </span>
                                                                <ul class="dropdown-menu m-t-xs" >
                                                                    <li><a rel="{$vo['log_id']}" href="javascript:void(0);" type="{$vo['log_type']}" onclick="del_confirm(this);">{:L('DELETE')}</a></li>
                                                                </ul>
                                                            </div>
                                                        </if>
                                                        <if condition = "$vo['sign'] eq 1">
                                                            <div class="social-avatar">
                                                                <img alt="image" style="width:35px;height:35px;" class="img-circle" src="{$vo['owner']['thumb_path']}">
                                                                <a class="role_info name-colors"  rel="{$vo['owner']['role_id']}" href="javascript:void(0);">{$vo['owner']['full_name']}</a>&nbsp;&nbsp;
                                                                <span class="text-muted">发布了一条签到记录</span>&nbsp;&nbsp;&nbsp;
                                                                <span class="text-muted" >{$vo['create_date']|date="Y-m-d H:i",###}</span>
                                                                <div class="text-muted" style="padding:0 15px 0 50px;">
                                                                    <div class="conent0" style="width:100%;">
                                                                        <img style="width:15px;height:15px;vertical-align:text-bottom;" src="__PUBLIC__/img/location.png"/>
                                                                        <span style="color:#666">{$vo['sign_info']['address']}</span>
                                                                        <input class="longitude" type="hidden" rel="{$vo['sign_info']['y']}"/>
                                                                        <!-- <a href="javascript:void(0);" style="font-size:12px;" class="map" >显示地图</a> -->
                                                                        <div id="allmap{$vo['log_id']}" rel="allmap{$vo['log_id']}" class="allmap"></div>
                                                                        <input class="latitude" type="hidden" rel="{$vo['sign_info']['x']}"/>
                                                                    </div>
                                                                    <div class="conent0">
                                                                        <span style="color:#000">签到说明：{$vo['sign_info']['log']}</span>
                                                                    </div>
                                                                    <div class="conent0">
                                                                        <div style="color:#000">现场照片：</div>
                                                                        <volist name="vo['sign_img']" id="v">
                                                                            <div class="box-secondary" rel="{$vo.img_id}" style="width:100px;height:100px;float:left;margin-left:5px;">
                                                                                <a href="{$v.path}" target="_self" class="litebox_file" data-litebox-group="group-{$vo['log_id']}">
                                                                                    <img src="{$v.path}" class="thumbnail thumb100" style="width:100%;height:100%;">
                                                                                </a>
                                                                            </div>
                                                                        </volist>
                                                                        <div style="clear:both;"></div>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <else />
                                                            <div class="social-avatar">
                                                                <img alt="image" style="width:35px;height:35px;" class="img-circle" src="{$vo['owner']['thumb_path']}">
                                                                <a class="role_info name-colors"  rel="{$vo.owner.role_id}" href="javascript:void(0);">{$vo['owner']['full_name']}</a>&nbsp;&nbsp;
                                                                <span class="text-muted">发布了一条快速记录</span>&nbsp;&nbsp;&nbsp;
                                                                <span class="text-muted" >{$vo.create_date|date="Y-m-d H:i",###}&nbsp;&nbsp;<a title="沟通类型" href="javascript:void(0);">{$vo['status_name']}</a></span>
                                                            </div>
                                                            <div class="social-body">
                                                                <span style="word-wrap:break-word;line-height: 21px;color: #000;">{$vo['content']}</span>
                                                                <if condition = "$vo['code']">
                                                                    <div class="log-relation"><i class="fa fa-bookmark"></i>&nbsp;<span>相关商机 : {$vo['code']}</span></div>
                                                                </if>
                                                                <if condition = "$vo['nextstep_time']">
                                                                    <div class="social-avatar" style="padding-top:10px;">
                                                                        <span class="text-muted pull-right">下次联系时间：{$vo['nextstep_time']|date="Y-m-d H:i",###}</span>
                                                                    </div>
                                                                </if>
                                                            </div>
                                                        </if>
                                                    </div>
                                                </div>
                                            </div>
                                        </volist>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div style="padding: 15px 0px 0px 20px; background: rgb(255, 255, 255); min-height: 492.48px;" id="left-content">
                    <ul class="nav nav-tabs" id="left_list" style="height:40px;">
                        <li><a href="#tab3" data-toggle="tab" type="tab3">简历原件</a></li>
                        <li class="active" ><a href="#tab1" data-toggle="tab" type="tab1">人才详情</a></li>
                        <li><a href="#tab4" data-toggle="tab" type="tab4">参与项目</a></li>
                        <li><a href="#tab6" data-toggle="tab" type="tab6" style="display: none;">简历日志</a></li>
                        <li><a href="#tab2" data-toggle="tab" type="tab2">附件</a></li>
                    </ul>
                    <div class="tab-content ">
                        <div class="tab-pane in active " id="tab1">
                            <div class="panel-body">
                                <div class="ibox-content gray-log" style="border: none;padding: 10px 20px;">
                                    基本信息
                                </div>
                                <div class="form-horizontal view-group " >
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">性别</label>
                                        <div class="col-lg-4">
                                            <p class="form-p">
                                                {$resume.sex}
                                            </p>
                                        </div>
                                        <label class="col-lg-2 control-label">目前年薪</label>
                                        <div class="col-lg-4">
                                            <p class="form-p">
                                                {$resume.curSalary}万
                                            </p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">出生年月</label>
                                        <div class="col-lg-4">
                                            <p class="form-p">
                                            <notempty name="resume.birthday">
                                                {$resume.birthday|date="Y-m",###}
                                            </notempty>
                                            </p>
                                        </div>
                                        <label class="col-lg-2 control-label">目前公司</label>
                                        <div class="col-lg-4">
                                            <p class="form-p">
                                                {$resume.curCompany}
                                            </p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">电话</label>
                                        <div class="col-lg-4">
                                            <p class="form-p telshow2">
                                                ************
                                                <i class="iconfont iconshow eye"></i>
                                            </p>
                                        </div>
                                        <label class="col-lg-2 control-label">目前职位</label>
                                        <div class="col-lg-4">
                                            <p class="form-p">
                                                {$resume.curPosition}
                                            </p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">邮箱</label>
                                        <div class="col-lg-4">
                                            <p class="form-p mailshow2">
                                                ************
                                                <i class="iconfont iconshow eye"></i>
                                            </p>
                                        </div>
                                        <label class="col-lg-2 control-label">目前状态</label>
                                        <div class="col-lg-4">
                                            <p class="form-p">
                                                {$resume.curStatus}
                                            </p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">学历</label>
                                        <div class="col-lg-4">
                                            <p class="form-p">
                                                {$resume.edu}
                                            </p>
                                        </div>
                                        <label class="col-lg-2 control-label">目前城市</label>
                                        <div class="col-lg-4">
                                            <p class="form-p">
                                                {$resume.location}
                                            </p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">毕业学校</label>
                                        <div class="col-lg-4">
                                            <p class="form-p">
                                                {$resume.school}
                                            </p>
                                        </div>
                                        <label class="col-lg-2 control-label">意向城市</label>
                                        <div class="col-lg-4">
                                            <p class="form-p">
                                                {$resume.intentCity}
                                            </p>
                                        </div>
                                    </div>
                                    <!--<div class="form-group">-->
                                    <!--<label class="col-lg-2 control-label">目前状态</label>-->
                                    <!--<div class="col-lg-10">-->
                                    <!--<p class="form-p">-->
                                    <!--{$resume.curStatus}-->
                                    <!--</p>-->
                                    <!--</div>-->
                                    <!--</div>-->
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">行业</label>
                                        <div class="col-lg-10">
                                            <p class="form-p">
                                                <span class="label label-warning">{$resume.now_industry}</span>
                                                <!--                                            <volist name="resume.industry" id="vo">
                                                                                                <span class="label label-warning" style="margin-right: 5px;">{$vo}</span>
                                                                                            </volist>-->
                                                <!--<span class="label label-warning">电子/互联网</span>-->
                                            </p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-lg-2 control-label">职能</label>
                                        <div class="col-lg-10">
                                            <p class="form-p">
                                            <volist name="resume.job_class" id="vo">
                                                <span class="label label-primary" style="margin-right: 5px;">{$vo}</span>
                                            </volist>
                                            <span class="label lable-primary">{$resume.job_class}</span>
                                            <!--<span class="label label-primary">政府研发</span>-->
                                            </p>
                                        </div>
                                    </div>
                                </div>

                                <div class="ibox-content gray-log contenttitle">
                                    工作经历
                                </div>
                                <div class="col-lg-12 contentview">
                                    <volist name="resume_work" id="vo">
                                        <div class="msg_item">
                                            <p>
                                                <span class="co3f16">{$vo.company}</span>
                                                <span class="co9f16 ml10">{$vo.jobPosition}</span>
                                                <span class="co9f13 fright">{$vo.starttime|date="Y-m",###} - 
                                                    <if condition="$vo.endtime neq 0">
                                                        {$vo.endtime|date="Y-m",###}</span>
                                            <else />
                                            至今</span>
                                            </if>
                                            </p>
                                            <p>
                                                <span class="co9f14">公司介绍:</span>
                                                <span class="co3f14">{$vo.companyDes}</span>
                                            </p>
                                            <if condition = "$vo.salary neq 0">                                            <p>
                                                    <span class="co9f14">薪资</span>
                                                    <span class="co3f14">{$vo.salary}</span>
                                                </p></if>



                                            <if condition = "$vo.duty neq ''">
                                                <p>
                                                    <span class="titlebb">职责描述</span>
                                                </p>
                                                <span class="co3f14">{$vo.duty|default=''}</span>
                                                <else />
                                                <p>
                                                    <span class="titlebb">岗位经历</span>
                                                </p>
                                                <volist name="vo.position" id="vp">
                                                    <p>
                                                        <span class="co3f14">{$vp.position}</span>
                                                    <if condition="$vp.start_date neq 0">
                                                        <span class="co9f13 fright">{$vp.start_date|date="Y-m",###} - 
                                                            <if condition="$vp.end_date neq 0">
                                                                {$vp.end_date|date="Y-m",###}</span>
                                                        <else />
                                                        至今</span>
                                                    </if>
                                            </if>

                                            </p>
                                            <if condition = "$vp.department neq ''">
                                                <p>
                                                    <span class="co9f14">职位部门:</span>
                                                    <span class="co3f14">{$vp.department}</span>
                                                </p></if>
                                            <p>
                                                <span class="co9f14">职位描述:</span>
                                                <span class="co3f14">{$vp.responsibility}</span>
                                            </p>
                                            <if condition = "$vp.underling_num neq ''">
                                                <p>
                                                    <span class="co9f14">下属人数:</span>
                                                    <span class="co3f14">{$vp.underling_num}</span>
                                                </p>
                                            </if>
                                            <if condition = "$vp.report_to neq ''">
                                                <p>
                                                    <span class="co9f14">汇报对象:</span>
                                                    <span class="co3f14">{$vp.report_to}</span>
                                                </p>
                                            </if>
                                    </volist>
                                    </if>

                                </div>
                                </volist>
                            </div>
                            <div class="ibox-content gray-log contenttitle">
                                项目经历
                            </div>
                            <div class="col-lg-12 contentview">
                                <volist name="resume_project" id="vo">
                                    <div class="msg_item">
                                        <p>
                                            <span class="co9f13">{$vo.starttime|date="Y-m",###} 至 {$vo.endtime|date="Y-m",###}</span>
                                            <span class="co3f16 ml10">{$vo.proName}</span>
                                        </p>
                                        <if condition = "$vo.proOffice neq ''">  
                                            <p>
                                                <span class="co9f14">项目职位:</span>
                                                <span class="co3f14">{$vo.proOffice}</span>
                                            </p>
                                        </if>
                                        <if condition = "$vo.proCompany neq ''">  
                                            <p>
                                                <span class="co9f14">所在公司:</span>
                                                <span class="co3f14">{$vo.proCompany}</span>
                                            </p>
                                        </if>
                                        <if condition = "$vo.proDes neq ''">  
                                            <p>
                                                <span class="co9f14">项目描述:</span>
                                                <span class="co3f14">{$vo.proDes}</span>
                                            </p>
                                        </if>
                                        <if condition = "$vo.responsibility neq ''">  
                                            <p>
                                                <span class="co9f14">项目责任:</span>
                                                <span class="co3f14">{$vo.responsibility}</span>
                                            </p>
                                        </if>
                                    </div>
                                </volist>
                            </div>
                            <div class="ibox-content gray-log contenttitle">
                                教育经历
                            </div>
                            <div class="col-lg-12 contentview">
                                <volist name="resume_edu" id="vo">
                                    <p>
                                        <span class="school">{$vo.schoolName}</span>
                                        <span class="time"><if condition="$vo.starttime neq '' && $vo.starttime neq '0'">({$vo.starttime|date="Y-m",###}-{$vo.endtime|date="Y-m",###})</if></span>
                                        <span class="major">{$vo.majorName}</span>
                                        <span class="major">
                                            <switch name="vo.degree">
                                            <case value="1">高中</case>
                                            <case value="2">中专</case>
                                            <case value="3">大专</case>
                                            <case value="4">本科</case>
                                            <case value="5">硕士</case>
                                            <case value="6">博士</case>
                                            <case value="7">MBA/EMBA</case>
                                            <case value="8">博士后</case>
                                            </switch> 
                                        </span>
                                    </p>
                                </volist>
                            </div>
                            <!--<div class="ibox-content gray-log contenttitle">-->
                            <!--优劣势分析-->
                            <!--</div>-->
                            <!--<div class="col-lg-12 contentview">{$resume_data[0].evaluate}</div>-->
                            <!--<div class="ibox-content gray-log contenttitle">-->
                            <!--技能-->
                            <!--</div>-->
                            <!--<div class="col-lg-12 contentview">{$resume_data[0].skill}</div>-->
                            <!--<div class="ibox-content gray-log contenttitle">-->
                            <!--语言能力-->
                            <!--</div>-->
                            <!--<div class="col-lg-12 contentview">-->
                            <!--{$resume_data[0].language}-->
                            <!--</div>-->

                        </div>
                        <div class="panel-body ">
                            <include file="Public:alert" />
                        </div>
                    </div>
                    <div class="tab-pane fade back_box" id="tab3">
                        <div class="panel-body">
                            <div class="ibox">
                                <if condition="$resume['file_resolve']">
                                    <!--<input type="hidden" value="{$resume.url}" id="resumeurl">-->
                                    <!--<body onload="load()">-->
                                        <!--<iframe id="iframe" style="width: 100%;min-height:1000px;"></iframe>-->
                                    <!--</body>-->
                                    <table class="table product-table">
                                        <tr>
                                            <td>附件名称</td>
                                            <td>{:L('SIZE')}</td>
                                            <td>上传人</td>
                                            <td>上传时间</td>
                                            <td>操作</td>
                                        </tr>
                                        <volist name="resume.file_resolve" id="vo">
                                            <tr>
                                                <td>
                                                    <img src="__PUBLIC__/productImg/{$vo['pic']}" alt="">&nbsp;&nbsp;&nbsp;
                                                    <a <if condition="in_array(getExtension($vo['name']),imgFormat())">class="litebox_file" href="{$vo['file_path']}" data-litebox-group="group-{$info['resume_id']}" title="点击查看大图"<else/>href="javascript:;" file="{$vo.file_path}" filename="{$vo.name}" onclick="filedown(this);"</if>>{$vo.name}</a>
                                                </td>
                                                <td>
                                                    {$vo.size}KB
                                                </td>
                                                <if condition="C('ismobile') neq 1">
                                                    <td>
                                                        <notempty name="vo.owner.user_name">{$vo.owner.user_name}</notempty>
                                                    </td>
                                                    <td>
                                                        <notempty name="vo.create_date">{$vo.create_date|date="Y-m-d H:i",###}</notempty>
                                                    </td>
                                                    <td class="tdleft">
                                                        <a href="javascript:;" file="{$vo.file_path}" filename="{$vo.name}" onclick="filedown(this);">下载</a>
                                                    </td>
                                                </if>
                                            </tr>
                                        </volist>

                                    </table>

                                    <else />
                                    <include file="Public:nodata" />
                                </if>
                            </div>
                        </div>
                    </div>
                    <div id="tab4"  class="tab-pane">
                        <div class="panel-body" style="padding-left: 0px;">
                            <div class="ibox">
                                <div class="tab-content">
                                    <div id="st1" class="tab-pane fade in active tab-content">
                                        <div class="title-bar" style="position: relative;z-index: 99;display: none;">
                                            <div class="row  clearfix" id="title-hide" style="display: block;">
                                                <input type="hidden" class="select_arr" value="">
                                                <ul class="breadcrum pull-left">
                                                    <li>已选中&nbsp;<span class="icheck_num">1</span>&nbsp;项</li>
                                                    <li>
                                                        <a class="add_customer" href="javascript:void(0)"  rel="removecc">&nbsp;从CallList移除</a>
                                                        <a class="add_customer" href="javascript:void(0)"  rel="tjgw">&nbsp;推荐给顾问面试</a>
                                                    </li>
                                                    <li class="last_li" style="bottom: 10px;"><big><a class="fa fa-times pull-right" id="back-show"></a></big></li>
                                                </ul>
                                            </div>
                                        </div>
                                        <table class="table select-table table-bordered">
                                            <tr class="tabTh" style="background-color:#f9fafc;">
                                                <td style="text-align:right;background-color:#f9fafc;padding:14px;color:#999;border-right: none;">项目阶段</td>
                                                <td style="text-align:left;background-color:#f9fafc;padding:14px;color:#999;border-left: none;"></td>
                                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">项目名称</td>
                                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">所属客户</td>
                                                <td style="text-align:center;background-color:#f9fafc;padding:14px;color:#999">跟进人</td>
                                                <td style="border-right: 1px solid #e7eaec;text-align:center;background-color:#f9fafc;padding:14px;color:#999">最近操作时间</td>
                                            </tr>
                                            <tbody>
                                            <volist name="project" id="vo">
                                                <tr>
                                                    <td style="text-align:center;padding:14px;color:#666;border-right: none;" colspan="2"><input type="button" class="btn btn-primary btn-sm slidebar-nav" value="{$process[$vo['status']]} >" style="width: 80px;" data-id="{$vo['id']}"></td>
                                                    <td style="text-align:left;padding:14px;color:#666;border-left: none;display: none">
                                                        <span class="icosgj">
                                                            <embed src="/Public/img/svg/yijieting.svg" width="30px" height="30px" type="image/svg+xml" pluginspage="http://www.adobe.com/svg/viewer/install/">
                                                            <div class="beizhus"></div>
                                                        </span>
                                                        <span class="icosgj">
                                                            <embed src="/Public/img/svg/ztgenjin.svg" width="30px" height="30px" type="image/svg+xml" pluginspage="http://www.adobe.com/svg/viewer/install/">
                                                            <div class="beizhus">暂停跟进</div>
                                                        </span>
                                                        <span class="icosgj">
                                                            <embed src="/Public/img/svg/mubiao.svg" width="30px" height="30px" type="image/svg+xml" pluginspage="http://www.adobe.com/svg/viewer/install/">
                                                            <div class="beizhus">不是目标候选人</div>
                                                        </span>
                                                    </td>
                                                    <td style="text-align:center;padding:14px;color:#666;"><a  href="{:U('business/view','id='.$vo['project_id'])}" style="margin-right: 5px;">{$vo.business_name}</a></td>
                                                    <td style="text-align:center;padding:14px;color:#666;"><a  href="{:U('customer/view','id='.$vo['com_id'])}" style="margin-right: 5px;">{$vo.customer_name}</a></td>
                                                    <td style="text-align:center;padding:14px;color:#666;">
                                                        <a class="role_info" rel="{$vo['tracker']}" href="javascript:void(0)" style="margin-right: 5px;">{$vo.user_name}</a>
                                                    </td>
                                                    <td style="text-align:center;padding:14px;color:#666;">{$vo.addtime|date='Y-m-d H:i:s',###}</td>
                                                </tr>
                                            </volist>

                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="tab-pane " id="tab2">
                        <div class="panel-body">
                            <div class="header1">
                                <div class="pull-left">
                                    <a href="javascript:void(0);" type="button" class="add_file btn btn-primary"><i class="fa fa-upload"></i>&nbsp;&nbsp;上传</a>
                                </div>
                                <div style="clear:both;"></div>
                            </div>
                            <if condition="$info.file eq null">
                                <include file="Public:nodata" />
                                <else />
                                <table class="table product-table">
                                    <tr>
                                        <td>附件名称</td>
                                        <td>{:L('SIZE')}</td>
                                        <td>上传人</td>
                                        <td>上传时间</td>
                                        <td>操作</td>
                                    </tr>
                                    <volist name="info.file" id="vo">
                                        <tr>
                                            <td>
                                                <img src="__PUBLIC__/productImg/{$vo['pic']}" alt="">&nbsp;&nbsp;&nbsp;
                                                <a <if condition="in_array(getExtension($vo['name']),imgFormat())">class="litebox_file" href="{$vo['file_path']}" data-litebox-group="group-{$info['resume_id']}" title="点击查看大图"<else/>href="javascript:;" file="{$vo.file_path}" filename="{$vo.name}" onclick="filedown(this);"</if>>{$vo.name}</a>
                                            </td>
                                            <td>
                                                {$vo.size}KB
                                            </td>
                                        <if condition="C('ismobile') neq 1">
                                            <td>
                                            <notempty name="vo.owner.user_name">{$vo.owner.user_name}</notempty>
                                            </td>
                                            <td>
                                            <notempty name="vo.create_date">{$vo.create_date|date="Y-m-d H:i",###}</notempty>
                                            </td>
                                            <td class="tdleft">
                                                <!--<a href="javascript:void(0);" rel="{$vo['file_id']}" class="change_file" data-id="{$_GET['id']}">替换</a>-->
                                                <a href="javascript:void(0);" rel="{$vo['file_id']}" class="del_file">{:L('DELETE')}</a>
                                                <a href="javascript:;" file="{$vo.file_path}" filename="{$vo.name}" onclick="filedown(this);">下载</a>
                                            </td>
                                        </if>
                                        </tr>
                                    </volist>

                                </table>
                            </if>
                        </div>
                    </div>
                    
                    <div class="tab-pane " id="tab6">
                        <div class="panel-body">
                            <div class="header1">
                                <div style="clear:both;"></div>
                            </div>
                            <table class="table product-table">
                                <!--无数据的时候显示-->
                                <div style="background-color:#fff;display: none;"><include file="Public:nodata" /></div>
                                <tr>
                                    <td>字段</td>
                                    <td>操作人</td>
                                    <td>操作时间</td>
                                </tr>
                                <tr>
                                    <td>
                                        简历创建
                                    </td>
                                    <td>
                                        <a href="#">操作人</a>
                                    </td>
                                    <td class="tdleft">
                                        2018-12-12 10:21
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="tabs-container" style="width: 29%;float: left;background: #e6e9f0;margin-left: 1%;min-height:632px;display: none">
            <div class="title-bar" style="float: left;width: 100%;">
                <div class="row " id="title-show" style="border-bottom: 1px solid #e7eaec;padding-bottom: 10px;">
                    <span style="color: #333333;font-size: 14px;margin-left: 10px;">最新备注</span>
                    <div class="btn-group pull-right">
                        <i class="fa fa-edit (alias)" id="editbtn" style="margin-right: 15px;cursor: pointer;font-size: 20px;"></i>
                    </div>
                </div>
                <div class="row beizhucontent" style="min-height:50px;padding: 20px;">
                    <div style="padding-bottom: 10px;">ququququ</div>
                    <span class="btn-group pull-right">
                        <span>2018-12-12 </span>
                        <a href="#" style="margin-left: 5px;">张航宇</a>
                    </span>
                </div>
                <form method="post" action="#">
                    <div class="form-group editerea" style="display: none;">
                        <div class="col-sm-12" style="padding:0">
                            <textarea class="form-control textedit" style="height:84px;border:0;outline:0;border-bottom:1px solid #ddd;resize:none" name="note"></textarea>
                        </div>
                        <div class="col-sm-12" style="text-align: right;">
                            <button class="btn btn-info" type="submit"><i class="fa fa-sms"></i>保存</button>
                            <span class="btn btn-default cancel" type="button"><i class="fa fa-sms"></i>取消</span>
                        </div>
                    </div>
                </form>


            </div>
            <div style="background: rgb(255, 255, 255); min-height: 492.48px;width: 100%;float: left;" id="left-content">
                <table class="table table-hover table-striped table_thead_fixed">
                    <tr>
                        <td><a href="#">田浩</a></td>
                    </tr>
                    <tr>
                        <td><a href="#">田浩</a></td>
                    </tr>
                    <tr>
                        <td><a href="#">田浩</a></td>
                    </tr>
                    <tr>
                        <td><a href="#">田浩</a></td>
                    </tr>
                    <tr>
                        <td><a href="#">田浩</a></td>
                    </tr>
                    <tr>
                        <td><a href="#">田浩</a></td>
                    </tr>
                    <tr>
                        <td><a href="#">田浩</a></td>
                    </tr>
                    <tr>
                        <td><a href="#">田浩</a></td>
                    </tr>
                    <tr>
                        <td><a href="#">田浩</a></td>
                    </tr>
                    <tr>
                        <td><a href="#">田浩</a></td>
                    </tr>
                </table>
            </div>
        </div>

    </div>
</div>
</div>
</div>
<div class="" style="display:none;" id="dialog-file" title="{:L('ADD_ATTACHMENT')}">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>
<div class="" style="display:none;" id="dialog-role-info" title="{:L('EMPLOYEE_INFORMATION')}">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>
<div class="" style="display:none;" id="dialog-mark" title="添加备注信息">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>
<div style="display:none" id="dialog-log" title="加入项目">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>
<div style="display:none" id="dialog-setting_reply" title="管理快捷沟通">
    <div class="spiner-example">
        <div class="sk-spinner sk-spinner-three-bounce">
            <div class="sk-bounce1"></div>
            <div class="sk-bounce2"></div>
            <div class="sk-bounce3"></div>
        </div>
    </div>
</div>
<link href="__PUBLIC__/css/litebox.css" rel="stylesheet" type="text/css">
<script src="__PUBLIC__/js/litebox.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/images-loaded.min.js" type="text/javascript"></script>
<script type="text/javascript">
//页面加载时执行Tab start
                                                                $(function () {
                                                                    var thisId = window.location.hash;
                                                                    var atype = thisId.substr(1);
                                                                    $('#left_list a[type="' + atype + '"]').tab('show');
                                                                });


                                                                $(function () {
                                                                    var resumeurl = $("#resumeurl").val();
                                                                    var iframe;
                                                                    iframe = document.getElementById("iframe");
                                                                    if (resumeurl) {
                                                                        iframe.src = "//" + resumeurl;
                                                                    }

                                                                })
// 页面加载时执行Tab end
                                                                $('#left_list a').click(function (e) {
                                                                    var maodian = '#' + $(this).attr('type');
                                                                    url_jump(maodian);
                                                                });
                                                                function url_jump(maodian) {
                                                                    var url = "{:U('product/view','id=')}{$resume[eid]}" + maodian;
                                                                    window.history.replaceState({}, 0, window.location.protocol + "//" + window.location.host + url);
                                                                }

//初始化图片查看插件
                                                                $('.litebox').liteBox({
                                                                      revealSpeed: 400,
                                                                      background: 'rgba(0,0,0,.8)',
                                                                      overlayClose: true,
                                                                      escKey: true,
                                                                      navKey: true,
                                                                      errorMessage: '图片加载失败.'
                                                                });
                                                                /**
                                                                 * 如果是图片时 双击可查看大图
                                                                 */
                                                                $('.litebox_file').liteBox({
                                                                      revealSpeed: 400,
                                                                      background: 'rgba(0,0,0,.8)',
                                                                      overlayClose: true,
                                                                      escKey: true,
                                                                      navKey: true,
                                                                      errorMessage: '图片加载失败.'
                                                                });

//排序
                                                                $(".ui-sortable").sortable({
                                                                    connectWith: ".box-secondary",
                                                                    stop: function () {
                                                                        var images_arr = new Array();
                                                                        $(".box-secondary").each(function (key, val) {
                                                                            images_arr.push($(val).attr('rel'));
                                                                        });

                                                                        $.post('{:U("product/sortImg")}', {images_arr: images_arr.join(',')}, 'json');
                                                                    }
                                                                });
                                                                <if condition="C('ismobile') eq 1">width=$('.container').width() * 0.9;<else/>width=800;</if>
                                                                $(".role_info").click(function () {
                                                                    $role_id = $(this).attr('rel');
                                                                    $('#dialog-role-info').dialog('open');
                                                                    $('#dialog-role-info').load('{:U("user/dialoginfo","id=")}' + $role_id);
                                                                });
                                                                $("#dialog-role-info").dialog({
                                                                    autoOpen: false,
                                                                    modal: true,
                                                                    width: 600,
                                                                    maxHeight: 550,
                                                                    position: ["center", 100]
                                                                });
                                                                $("#dialog-file").dialog({
                                                                    autoOpen: false,
                                                                    modal: true,
                                                                    width: width,
                                                                    maxHeight: 400,
                                                                    position: ["center", 100],
                                                                    buttons: {
                                                                        "确定": function () {
                                                                            location.reload();
                                                                        },
                                                                        "取消": function () {
                                                                            $(this).dialog("close");
                                                                        }
                                                                    }
                                                                });
                                                                $(".add_file").click(function () {
                                                                    $('#dialog-file').dialog('open');
                                                                    $('#dialog-file').load('{:U("file/add","r=RResumeFile&module=resume&id=".$resume[eid])}');
                                                                });
                                                                $(".more").click(function () {
                                                                    log_id = $(this).attr('rel');
                                                                    $('#llog_' + log_id).attr('class', '');
                                                                    $('#slog_' + log_id).attr('class', 'hide');
                                                                });


                                                                $(".log_calllist").click(function () {
                                                                    $('#dialog-log').dialog('open');
                                                                    $('#dialog-log').load('{:U("log/resume_project","r=RCustomerLog&module=customer&id=")}' + $(this).attr('rel'));
                                                                });


                                                                $("#dialog-log").dialog({
                                                                    autoOpen: false,
//    modal: true,
                                                                    width: 750,
//    minHeight:300,
                                                                    maxHeight: 500,
                                                                    position: ["center", 100],
                                                                    buttons: {
                                                                        "确定": function () {
                                                                            var log_content = $('#log_content').val();
                                                                            if (log_content == "") {
                                                                                alert_crm("请填写沟通记录！");
                                                                                $("#log_content").focus();
                                                                                return false;
                                                                            }
                                                                            var status_id = $('#status_id option:selected').val();
                                                                            if ($('#save_reply').is(':checked') && status_id == '') {
                                                                                alert_crm("请选择跟进类型！");
                                                                                $("#status_id").focus();
                                                                                return false;
                                                                            }
                                                                            $.ajax({
                                                                                type: 'post',
                                                                                url: "{:U('Log/add_fine_project')}",
                                                                                data: $('#dialog_form1').serialize(),
                                                                                async: false,
                                                                                success: function (data) {
                                                                                    if (data.status == 1) {
                                                                                        swal("操作成功！", "该人选成功加入项目！", "success");
                                                                                        $("#dialog-log").dialog("close");
                                                                                        // location.reload();
                                                                                    } else {
                                                                                        swal({
                                                                                            title: "操作失败！",
                                                                                            text: data.info,
                                                                                            type: "error"
                                                                                        });
                                                                                        return false;
                                                                                    }
                                                                                },
                                                                                dataType: 'json'
                                                                            });
                                                                        },
                                                                        "取消": function () {
                                                                            $(this).dialog("close");
                                                                        }
                                                                    },
                                                                    close: function () {
                                                                        $(this).html('');
                                                                    }
                                                                });

                                                                $(".del_beizhu").click(function () {
                                                                    var bid = $(this).attr("rel");
                                                                    swal({
                                                                        title: "您确定要删除这条备注信息吗？",
                                                                        text: "删除后将无法恢复，请谨慎操作！",
                                                                        type: "warning",
                                                                        showCancelButton: true,
                                                                        confirmButtonColor: "#DD6B55",
                                                                        confirmButtonText: "是的，我要删除！",
                                                                        cancelButtonText: '让我再考虑一下…',
                                                                        closeOnConfirm: false,
                                                                        closeOnCancel: false
                                                                    }, function (isConfirm) {
                                                                        if (isConfirm) {
                                                                            $.ajax({
                                                                                type: 'get',
                                                                                url: "url" + bid,
                                                                                async: false,
                                                                                success: function (data) {
                                                                                    if (data.status == 1) {
                                                                                        swal("删除成功！", "您已经永久删除了信息！", "success");
                                                                                        location.reload();
                                                                                    } else {
                                                                                        swal({
                                                                                            title: "操作失败！",
                                                                                            text: data.info,
                                                                                            type: "error"
                                                                                        })
                                                                                        return false;
                                                                                    }
                                                                                },
                                                                                dataType: 'json'
                                                                            });
                                                                        } else {
                                                                            swal("已取消", "您取消了删除操作！", "error");
                                                                        }
                                                                    })
                                                                })

                                                                $('.del_product').click(function () {
                                                                    var file_id = $(this).attr('rel');
                                                                    swal({
                                                                        title: "您确定要删除这个附件吗？",
                                                                        text: "删除后将无法恢复，请谨慎操作！",
                                                                        type: "warning",
                                                                        showCancelButton: true,
                                                                        confirmButtonColor: "#DD6B55",
                                                                        confirmButtonText: "是的，我要删除！",
                                                                        cancelButtonText: '让我再考虑一下…',
                                                                        closeOnConfirm: false,
                                                                        closeOnCancel: false
                                                                    },
                                                                            function (isConfirm) {
                                                                                if (isConfirm) {
                                                                                    $.ajax({
                                                                                        type: 'get',
                                                                                        url: "{:U('file/delete','r=RFileProduct&id=')}" + file_id,
                                                                                        async: false,
                                                                                        success: function (data) {
                                                                                            if (data.status == 1) {
                                                                                                swal("删除成功！", "您已经永久删除了信息！", "success");
                                                                                                location.reload();
                                                                                            } else {
                                                                                                swal({
                                                                                                    title: "操作失败！",
                                                                                                    text: data.info,
                                                                                                    type: "error"
                                                                                                })
                                                                                                return false;
                                                                                            }
                                                                                        },
                                                                                        dataType: 'json'
                                                                                    });
                                                                                } else {
                                                                                    swal("已取消", "您取消了删除操作！", "error");
                                                                                }
                                                                            });
                                                                });

// 下架
                                                                $('#delete_product').click(function () {
                                                                    var product_id = "{$product['product_id']}";
                                                                    swal({
                                                                        title: "温馨提示",
                                                                        text: "您确定要下架这个产品吗？",
                                                                        type: "warning",
                                                                        showCancelButton: true,
                                                                        confirmButtonColor: "#DD6B55",
                                                                        confirmButtonText: "是的，我要下架！",
                                                                        cancelButtonText: '让我再考虑一下…',
                                                                        closeOnConfirm: false,
                                                                        closeOnCancel: false
                                                                    },
                                                                            function (isConfirm) {
                                                                                if (isConfirm) {
                                                                                    $.ajax({
                                                                                        type: 'get',
                                                                                        url: "{:U('product/delete','id=')}" + product_id,
                                                                                        async: false,
                                                                                        success: function (data) {
                                                                                            if (data.status == 1) {
                                                                                                swal("下架成功！", "您已经下架了该产品！", "success");
                                                                                                location.reload();
                                                                                            } else {
                                                                                                swal({
                                                                                                    title: "操作失败！",
                                                                                                    text: data.info,
                                                                                                    type: "error"
                                                                                                })
                                                                                                return false;
                                                                                            }
                                                                                        },
                                                                                        dataType: 'json'
                                                                                    });
                                                                                } else {
                                                                                    swal("已取消", "您取消了下架操作！", "error");
                                                                                }
                                                                            });
                                                                });

//上架产品
                                                                $('#revert_product').click(function () {
                                                                    var product_id = "{$product['product_id']}";
                                                                    swal({
                                                                        title: "温馨提示",
                                                                        text: "您确定要上架这个产品吗？",
                                                                        type: "warning",
                                                                        showCancelButton: true,
                                                                        confirmButtonColor: "#DD6B55",
                                                                        confirmButtonText: "是的，我要上架！",
                                                                        cancelButtonText: '让我再考虑一下…',
                                                                        closeOnConfirm: false,
                                                                        closeOnCancel: false
                                                                    },
                                                                            function (isConfirm) {
                                                                                if (isConfirm) {
                                                                                    $.ajax({
                                                                                        type: 'get',
                                                                                        url: "{:U('product/revert','product_id=')}" + product_id,
                                                                                        async: false,
                                                                                        success: function (data) {
                                                                                            if (data.status == 1) {
                                                                                                swal("上架成功！", "您已经上架了该产品！", "success");
                                                                                                location.reload();
                                                                                            } else {
                                                                                                swal({
                                                                                                    title: "操作失败！",
                                                                                                    text: data.info,
                                                                                                    type: "error"
                                                                                                })
                                                                                                return false;
                                                                                            }
                                                                                        },
                                                                                        dataType: 'json'
                                                                                    });
                                                                                } else {
                                                                                    swal("已取消", "您取消了下架操作！", "error");
                                                                                }
                                                                            });
                                                                });

                                                                $(".addmark").click(function () {
                                                                    $('#dialog-mark').dialog('open');
                                                                    $('#dialog-mark').load("{:U('product/addmark')}");
                                                                })
                                                                $(".editmark").click(function () {
                                                                    $('#dialog-mark').dialog('open');
                                                                    $('#dialog-mark').load("{:U('product/addmark')}");
                                                                })

                                                                $("#dialog-mark").dialog({
                                                                    autoOpen: false,
                                                                    modal: true,
                                                                    width: 800,
                                                                    height: 400,
                                                                    close: function () {
                                                                        $(this).html("");
                                                                    },
                                                                    buttons: {
                                                                        "{:L('OK')}": function () {
                                                                            var item = $('input:radio[name="business"]:checked').val();
                                                                            var name = $('input:radio[name="business"]:checked').parent().next().html();
                                                                            if (item) {
                                                                                $('#resume_id').val(item);
                                                                                $('#business_name').val(name);
                                                                            }
                                                                            $(this).dialog("close");
                                                                        },
                                                                        "{:L('CANCEL')}": function () {
                                                                            $(this).dialog("close");
                                                                        }
                                                                    },
                                                                    position: ["center", 100]
                                                                });

                                                                $("#addbq").click(function () {
                                                                    var addbq = $(".bqcontent").val();
                                                                    var num = $(".itembq").length;
                                                                    if (num >= 5) {
                                                                        alert_crm("最多添加5个标签！");
                                                                        $(".bqcontent").val("");
                                                                        return false;
                                                                    }
                                                                    if (addbq == "") {
                                                                        alert_crm("标签不能为空！");
                                                                        return false;
                                                                    }
                                                                    var flag = 0;
                                                                    $(".itembq").each(function () {
                                                                        var _this = $(this);
                                                                        if (addbq == _this.text()) {
                                                                            flag = 1;
                                                                        }
                                                                    })
                                                                    if (flag == 1) {
                                                                        alert_crm("不能添加相同标签！");
                                                                        $(".bqcontent").val("");
                                                                        return false;
                                                                    }


                                                                    $.ajax({
                                                                        type: "post",
                                                                        url: "{:U('product/addbq')}",
                                                                        data: {
                                                                            addbq: addbq,
                                                                            eid: "{$resume['eid']}"
                                                                        },
                                                                        success: function (data) {
                                                                            $(".yibiqiao").append('<span class="itembq">' + addbq + '<i class="mrl10 icon-remove"></i></span>');
                                                                            $(".bqcontent").val("");
                                                                        }
                                                                    })


                                                                })

//删除标签
                                                                $("body").on("click", ".icon-remove", function () {
                                                                    $(this).closest(".itembq").remove();
                                                                    var resume_label = Array();
                                                                    $(".resume_label").each(function () {
                                                                        resume_label.push($(this).html());
                                                                    })
                                                                    resume_label = resume_label.join(",");

                                                                    $.ajax({
                                                                        type: "post",
                                                                        url: "{:U('product/dellable')}",
                                                                        data: {
                                                                            resume_label: resume_label,
                                                                            eid: "{$resume['eid']}"
                                                                        }
                                                                    })

                                                                })

                                                                $("#editbtn").click(function () {
                                                                    $(".beizhucontent").hide();
                                                                    $(".editerea").show();
                                                                    $(".textedit").focus();
                                                                })

                                                                $(".cancel").click(function () {
                                                                    $(".textedit").val("");
                                                                    $(".beizhucontent").show();
                                                                    $(".editerea").hide();
                                                                })

//项目详情阶段操作
                                                                var timer;
                                                                $(document).on('click', '.slidebar-nav', function () {

                                                                    var customer_id = $(this).attr('data-id');
                                                                    clearTimeout(timer);
                                                                    timer = setTimeout(function () {

                                                                        if ($("#right-sidebar-log").css('right') != '0px') {
                                                                            $("#right-sidebar-log").animate({right: '0px'}, 600);
                                                                        }
                                                                        $('#sidebar-container').load("/index.php?m=business&a=listajax&id=" + customer_id);
                                                                    }, 1000);
                                                                });

                                                                $(document).on("click", ".closeslide", function () {
                                                                    if ($("#right-sidebar-log").css('right') == '0px') {
                                                                        $("#right-sidebar-log").animate({right: '-40%'}, 400);
                                                                    }
                                                                })

//切换电话显示
                                                                $('.eye').click(ar => {
                                                                    var item = "{$resume['eid']}";
                                                                    var roleID = "{$Think.session.role_id}";
                                                                    $.post(
                                                                            "{:U('contacts/isScan')}",
                                                                            {role_id: roleID, item_id: item, type: 1},
                                                                            res => {
                                                                                if (res.code == 200) {
                                                                                    if (res.info) {
                                                                                        var r = confirm(res.info);
                                                                                        if (r == false) {
                                                                                            return
                                                                                        }
                                                                                    }
                                                                                    $.post(
                                                                                            "{:U('contacts/infoScan')}",
                                                                                            {role_id: roleID, item_id: item, type: 1},
                                                                                            val => {
                                                                                                if (val.code == 200) {
                                                                                                    document.querySelector('.telshow').innerHTML = val.info.telephone;
                                                                                                    document.querySelector('.mailshow').innerHTML = val.info.email;
                                                                                                    document.querySelector('.telshow2').innerHTML = val.info.telephone;
                                                                                                    document.querySelector('.mailshow2').innerHTML = val.info.email;
                                                                                                }
                                                                                            }
                                                                                    )


                                                                                } else {
                                                                                    alert(res.info)
                                                                                }
                                                                            })
                                                                })
</script>
<include file="Public:footer" />

<div id="right-sidebar-log">
    <!--the css for jquery.mCustomScrollbar-->
    <link rel="stylesheet" href="__PUBLIC__/emoji/css/jquery.mCustomScrollbar.min.css"/>
    <!--the css for this plugin-->
    <link rel="stylesheet" href="__PUBLIC__/emoji/css/jquery.emoji.css"/>
    <!--(Optional) the js for jquery.mCustomScrollbar's addon-->
    <script src="__PUBLIC__/emoji/js/jquery.mousewheel-3.0.6.min.js"></script>
    <!--the js for jquery.mCustomScrollbar-->
    <script src="__PUBLIC__/emoji/js/jquery.mCustomScrollbar.min.js"></script>
    <!--the js for this plugin-->
    <script src="__PUBLIC__/emoji/js/jquery.emoji.js"></script>

    <div class="sidebar-container" id="sidebar-container">

    </div>
</div>
<script>
                                                                //快捷沟通
                                                                $(".select2").select2();

                                                                $("#dialog-setting_reply").dialog({
                                                                    autoOpen: false,
                                                                    // modal: true,
                                                                    width: 550,
                                                                    maxHeight: 450,
                                                                    position: ["center", 100],
                                                                    close: function () {
                                                                        selectStatus();//更新
                                                                        $(this).html("");
                                                                    },
                                                                    buttons: {
                                                                        "确定": function () {
                                                                            $('#status_form1').submit();
                                                                            $(this).dialog("close");
                                                                        },
                                                                        "取消": function () {
                                                                            selectStatus();//更新
                                                                            $(this).dialog("close");
                                                                        }
                                                                    }
                                                                });

                                                                $(function () {
                                                                    $("#setting_reply_dialog").click(function () {
                                                                        $('#dialog-setting_reply').dialog('open');
                                                                        $('#dialog-setting_reply').load('{:U("setting/replyList")}');
                                                                    });

                                                                    //设置联系人重要程度
                                                                    $(".set_major").click(function () {
                                                                        var contractid = $(this).attr('rel');
                                                                        $.ajax({
                                                                            url: '',
                                                                            type: 'post',
                                                                            data: {
                                                                                contractid, contractid
                                                                            },
                                                                            success: function (data) {
                                                                                if (data.status == 1) {
                                                                                    swal("操作提示！", "联系人设置成功！", "success");
                                                                                    location.reload();
                                                                                } else {
                                                                                    swal("操作提示！", "设置失败，请重试！", "error");
                                                                                    return false;
                                                                                }

                                                                            }
                                                                        })
                                                                    })
                                                                })

                                                                function selectStatus() {
                                                                    var status_id = $("#status_id option:selected").val();
                                                                    var temp = '<option value="">--请选择--</option>';
                                                                    $.ajax({
                                                                        type: 'post',
                                                                        url: "{:U('setting/getReplyByStatus')}",
                                                                        data: {status_id: status_id},
                                                                        async: false,
                                                                        success: function (data) {
                                                                            $.each(data.data, function (k, v) {
                                                                                temp += '<option value="' + v.content + '">' + v.str_content + '</option>';
                                                                            });
                                                                        },
                                                                        dataType: 'json'
                                                                    });
                                                                    $('#replay_list').html(temp);
                                                                }

                                                                function selectReply() {
                                                                    var replay_content = $("#replay_list option:selected").val();
                                                                    var status_id = $("#replay_list option:selected").attr('rel');
                                                                    //修改跟进类型
                                                                    $("#status_id option[value=" + status_id + "]").attr('selected', true);
                                                                    //判断是否替换
                                                                    var log_content = $('#log-text').val();
                                                                    if (log_content !== '') {
                                                                        swal({
                                                                            title: '',
                                                                            text: '已填写沟通日志内容，确定要替换吗？',
                                                                            type: "warning",
                                                                            showCancelButton: true,
                                                                            confirmButtonColor: "#DD6B55",
                                                                            confirmButtonText: "确认",
                                                                            cancelButtonText: "取消",
                                                                            closeOnConfirm: true,
                                                                            closeOnCancel: true}, function (isConfirm) {
                                                                            if (isConfirm) {
                                                                                $('#log-text').val(replay_content);
                                                                            } else {
                                                                                return false;
                                                                            }
                                                                        });
                                                                    } else {
                                                                        $('#log-text').val(replay_content);
                                                                    }
                                                                }

                                                                $('#log-list').on('click', '.map', function () {
                                                                    $(this).next('.allmap').slideToggle('show');
                                                                    var a = $(this).siblings('.longitude').attr('rel');
                                                                    var b = $(this).siblings('.latitude').attr('rel');
                                                                    var vals = $(this).next('.allmap').attr('rel');
                                                                    var url = "{:U('index/gettranslocation')}" + "&longtitude=" + a + "&latitude=" + b;
                                                                    $.get(url, function (data) {
                                                                        var x = data.data.x;
                                                                        var y = data.data.y;
                                                                        setTimeout("mapInit(" + y + "," + x + "," + vals + ")", 1000);
                                                                    })
                                                                });

                                                                function mapInit(x, y, mapID) {
                                                                    var map = new BMap.Map(mapID);
                                                                    var point = new BMap.Point(y, x);
                                                                    map.centerAndZoom(point, 15);
                                                                    var marker = new BMap.Marker(point);  // 创建标注
                                                                    map.addOverlay(marker);               // 将标注添加到地图中
                                                                    map.enableScrollWheelZoom(true);
                                                                }
                                                                ;
                                                                /**
                                                                 * 页面加载时执行Tab start
                                                                 */
                                                                $(function () {
                                                                    var thisId = window.location.hash;
                                                                    var atype = thisId.substr(1);
                                                                    // $('#left_list a[type="'+atype+'"]').trigger('click');
                                                                    $('#left_list a[type="' + atype + '"]').tab('show');
                                                                });



                                                                var resume_id = "{$resume_id}";

                                                                /**
                                                                 * 附件 如果是图片时 双击可查看大图
                                                                 */
                                                                $('.litebox_file').liteBox({
                                                                    revealSpeed: 400,
                                                                    background: 'rgba(0,0,0,.8)',
                                                                    overlayClose: true,
                                                                    escKey: true,
                                                                    navKey: true,
                                                                    errorMessage: '图片加载失败.'
                                                                });
                                                                $("#dialog-file").dialog({
                                                                    autoOpen: false,
                                                                    modal: true,
                                                                    width: 800,
                                                                    maxHeight: 400,
                                                                    position: ["center", 100],
                                                                    buttons: {
                                                                        "确定": function () {
                                                                            location.reload();
                                                                        },
                                                                        "取消": function () {
                                                                            $(this).html('');//清空缓存
                                                                            $(this).dialog("close");
                                                                        }
                                                                    }
                                                                });


                                                                $(".role_info").click(function () {
                                                                    $role_id = $(this).attr('rel');
                                                                    $('#dialog-role-info').dialog('open');
                                                                    $('#dialog-role-info').load('{:U("user/dialoginfo","id=")}' + $role_id);
                                                                });

                                                                $("#dialog-role-info").dialog({
                                                                    autoOpen: false,
                                                                    modal: true,
                                                                    width: 600,
                                                                    maxHeight: 550,
                                                                    position: ["center", 100]
                                                                });

                                                                $('.business_code').on('click', function () {
                                                                    var is_checked = $(this).attr('rel');
                                                                    if (is_checked == 1) {
                                                                        $(this).attr('rel', '');
                                                                        $(this).prop('checked', false);
                                                                    } else {
                                                                        $('.business_code').attr('rel', '');
                                                                        $(this).attr('rel', 1);
                                                                    }
                                                                });




                                                                /*跟进记录*/
                                                                function btnHide() {
                                                                    $('#log-text').attr('rows', 1);
                                                                    $('#log-btn').hide();
                                                                    $('#business_table').hide();
                                                                    $('#log-text').val('');
                                                                }
                                                                $('#log-text').focus(function () {
                                                                    $(this).attr('rows', 4);
                                                                    $('#log-btn').show();
                                                                    $('#business_table').show();
                                                                    $('#add_log').prop('disabled', false);
                                                                });
                                                                $('#log-text').focusout(function () {
                                                                    var code_id = $("input[name='id']:checked").val();
                                                                    if ($(this).val() == '' && code_id == '') {
                                                                        btnHide();
                                                                    }
                                                                });
                                                                $('#quxiao').click(function () {
                                                                    btnHide();
                                                                    return false;
                                                                });
                                                                /*ajax 提交记录*/

                                                                $('#add_log').click(function () {
                                                                    var log_content = $.trim($('#log-text').val());
                                                                    if (log_content == '') {
                                                                        alert_crm('沟通日志内容不能为空！');
                                                                        return false;
                                                                    }
                                                                    //跟进类型
                                                                    // var status_id = $('#status_id option:selected').val();
                                                                    // if (status_id == '') {
                                                                    //     alert_crm('跟进类型不能为空！');
                                                                    //     $('#add_log').prop('disabled',false);
                                                                    // }

                                                                    var radio_id = $('#product-radio input:radio:checked').val();
                                                                    var code = $('#product-radio input:radio:checked').attr('code');
                                                                    var html_code = "<div class='log-relation'><i class='fa fa-bookmark'></i>&nbsp;<span>相关商机:" + code + "</span></div>";
                                                                    //console.log(radio_id);
                                                                    var log_type = 'rBusinessLog';

                                                                    var status_name = '';
                                                                    if ($('#status_id option:selected').text() !== '--请选择--') {
                                                                        status_name = $('#status_id option:selected').text();
                                                                    }
                                                                    var nextstep_time_log = '';
                                                                    if ($('#nextstep_time_log').val() !== '') {
                                                                        nextstep_time_log = $('#nextstep_time_log').val();
                                                                    }

                                                                    if (radio_id == null || radio_id == 0) {
                                                                        var html_code = '';

                                                                        log_type = 'RResumeLog';
                                                                    }

                                                                    $(this).prop('disabled', true);
                                                                    $.post("{:U('Log/add')}", $("#add-form").serialize(), function (data) {
                                                                        if (data.status == 1) {
                                                                            var content = $('#log-text').val().replace('&nbsp', '&NBSP');
                                                                            var log_html = "<div class='ibox-content gray-bg' log-rel='" + data.data.log_id + "' style='margin-bottom: 18px'><div class='social-feed-separated clearfix'><div class='social-feed-box'><div class='pull-right social-action dropdown'><span data-toggle='dropdown' class='dropdown-toggle'><i style='font-size:20px;cursor:pointer' class='fa fa-angle-down'></i></span><ul class='dropdown-menu m-t-xs' ><li><a  rel='" + data.data.log_id + "' href='javascript:void(0);' type='" + log_type + "' onclick='del_confirm(this);'>{:L('DELETE')}</a></li></ul></div><div class='social-avatar'><img alt='image' style='width:35px;height:35px;' class='img-circle' src='" + data.data.owner.thumb_path + "'><a class='role_info name-colors'  rel='" + data.data.owner.role_id + "' href='javascript:void(0)'>" + data.data.owner.full_name + "</a>&nbsp;&nbsp;<span class='text-muted'>添加了一条快速记录</span>&nbsp;&nbsp;<span class='text-muted' >" + data.data.date + "&nbsp;&nbsp;<a title='沟通类型' href='javascript:void(0);'>" + status_name + "</a></span></div><div class='social-body'><span style='word-wrap:break-word;line-height: 21px;color: #000;'>" + content + "</span>" + html_code + "</div>";
                                                                            if (nextstep_time_log !== '1970-01-01 08:00') {
                                                                                log_html += "<div class='social-avatar' style='padding-top:10px;''><span class='text-muted pull-right'>下次联系时间：" + nextstep_time_log + "</span></div>";
                                                                            }
                                                                            log_html += "</div></div></div>";

                                                                            $('#log-list').prepend(log_html);
                                                                            btnHide();
                                                                        } else {
                                                                            alert_crm('添加失败, 请重试');
                                                                        }
                                                                        $("[name='r']").val('rBusinessLog');
                                                                        $("[name='module']").val('business');
                                                                        $("#resume_id").val(resume_id);
                                                                    });
                                                                });
                                                                /*删除日志*/
                                                                function del_confirm(e) {
                                                                    swal({
                                                                        title: "确定要删除沟通日志吗？",
                                                                        text: "删除后将无法恢复，请谨慎操作！",
                                                                        type: "warning",
                                                                        showCancelButton: true,
                                                                        confirmButtonColor: "#DD6B55",
                                                                        confirmButtonText: "是的，我要删除！",
                                                                        cancelButtonText: '让我再考虑一下…',
                                                                        closeOnConfirm: false,
                                                                        closeOnCancel: false
                                                                    },
                                                                            function (isConfirm) {
                                                                                if (isConfirm) {
                                                                                    var log_id = $(e).attr('rel');
                                                                                    var type = $(e).attr('type');
                                                                                    $.get("{:U('log/delete')}", {r: type, id: log_id}, function (data) {
                                                                                        if (data != 0) {
                                                                                            swal({
                                                                                                title: "删除成功！",
                                                                                                text: "",
                                                                                                type: "success"
                                                                                            });
                                                                                            $("[log-rel='" + log_id + "']").remove();
                                                                                        } else {
                                                                                            swal({
                                                                                                title: "操作失败！",
                                                                                                text: data.info,
                                                                                                type: "error"
                                                                                            })
                                                                                            return false;
                                                                                        }
                                                                                    });
                                                                                } else {
                                                                                    swal("已取消", "您取消了删除操作！", "error");
                                                                                }
                                                                            });
                                                                }
                                                                ;


                                                                $('.del_file').click(function () {
                                                                    var file_id = $(this).attr('rel');
                                                                    swal({
                                                                        title: "您确定要删除这个附件吗？",
                                                                        text: "删除后将无法恢复，请谨慎操作！",
                                                                        type: "warning",
                                                                        showCancelButton: true,
                                                                        confirmButtonColor: "#DD6B55",
                                                                        confirmButtonText: "是的，我要删除！",
                                                                        cancelButtonText: '让我再考虑一下…',
                                                                        closeOnConfirm: false,
                                                                        closeOnCancel: false
                                                                    },
                                                                            function (isConfirm) {
                                                                                if (isConfirm) {
                                                                                    $.ajax({
                                                                                        type: 'get',
                                                                                        url: "{:U('file/delete','r=RResumeFile&id=')}" + file_id,
                                                                                        async: false,
                                                                                        success: function (data) {
                                                                                            if (data.status == 1) {
                                                                                                swal("删除成功！", "您已经永久删除了信息！", "success");
                                                                                                location.reload();
                                                                                            } else {
                                                                                                swal({
                                                                                                    title: "操作失败！",
                                                                                                    text: data.info,
                                                                                                    type: "error"
                                                                                                })
                                                                                                return false;
                                                                                            }
                                                                                        },
                                                                                        dataType: 'json'
                                                                                    });
                                                                                } else {
                                                                                    swal("已取消", "您取消了删除操作！", "error");
                                                                                }
                                                                            });
                                                                });



</script>
